USB (Universal Serial Bus) is a specification to establish communication between a device and a host controller. Since the USB has plug-and-play capability, USB devices have been used in many applications. The common USB devices are for example USB video players, USB storage devices, USB mice, USB keyboards, and the like. During or after a USB device is fabricated, a testing procedure is usually performed to assure normal functions of the USB device.
Take a USB keyboard for example. According to a simple testing procedure, the USB keyboard is firstly connected with a computer. Then, all keys of the USB keyboard are manually and successively depressed by the tester. After the keys are depressed, the functions corresponding respective keys are observed to judge whether any defects are present. The manual testing procedure is time-consuming and labor-intensive. In addition, since too many keys need to be manually tested, the tester is readily suffered from fatigue after a long testing time period. Under this circumstance, the possibility of erroneously depressing the keys is increased. For solving these problems, a commercially available automatic keyboard testing device for testing keyboard is disclosed in for example Taiwanese Patent Publication No. 00325905. The operating principles of this patent are known in the art, and are not redundantly described herein.
Before the USB device is tested, the USB device needs to be connected with a computer or a testing device. During the process of connecting the USB device with the computer or the testing device, a message indicating a device change is generated. At the same time, USB protocol descriptions are transmitted from the USB device to the computer. By reading the USB protocol descriptions, the computer may identify the function of the USB device. The USB protocol descriptions are also referred as descriptors. A USB device has several descriptors, including a device descriptor, a configuration descriptor, an interface descriptor, an endpoint descriptor, and the like. Another USB device further includes a string descriptor, a class descriptor and a report descriptor. According to the practical requirement of the USB device, the number of descriptors is increased or decreased. After the descriptors are received by the computer, the descriptors of the USB device are stored in a device registry. From now on, after the USB device is connected with the computer again, the USB device will be detected by the computer. Via the device registry, the USB device is identified by the computer in order to enable the configuration of the USB device.
For example, the computer of the testing device is operated under a Microsoft Windows operating system. When the USB device is connected with the computer (or the testing device) to transmit the descriptors, all USB ports of the computer will be detected by the Microsoft Windows operating system. Under this circumstance, the descriptors of the USB device are repeatedly detected by the computer. After the procedure of detecting all USB ports of the computer is completed, the procedure of enabling configuration of the USB device is done and then the procedure of automatically testing the USB device is performed. Although the computer is able to detect all USB ports, the computer fails to judge whether the configuration of the USB device is enabled. In other words, the computer fails to determine the timing of performing the automatic testing procedure. It is necessary to judge whether the USB device is configured to the computer by manpower. After the USB device is configured, the automatic testing device is activated to perform the automatic testing procedure. Since the manpower is indispensable, the conventional automatic testing procedure is ineffective.